<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEntrustsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('entrust', function (Blueprint $table) {
            $table->increments('id');
            $table->string('start_addr',100)->comment('出发地');
            $table->string('end_addr',100)->comment('到达地');
            $table->dateTime('start_time')->comment('开始时间');
            $table->dateTime('end_time')->comment('结束时间');
            $table->string('car_card',20)->comment('车牌号');
            $table->string('driver',20)->comment('司机名');
            $table->string('phone',20)->comment('电话号');
            $table->string('remark',200)->comment('备注');
            $table->tinyInteger('status')->default(1)->comment('1为委托中，2为已关闭，3为已完成');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('entrust');
    }
}
